/**
 * Copyright (c) 2023 - present All rights reserved.
 * <p>
 * Reprinted has been protected by the copyright laws.
 */

package cn.myxl.smart.devkit.core.util;


import com.rits.cloning.Cloner;

/**
 * @author alan.yang.zhang
 * @date 2023-11-21 11:59
 */

public class SMDUtil {
	private static final Cloner cloner = new Cloner();

	/**
	 * 复制对象（深度拷贝）
	 *
	 * @param sourceObject
	 * @param <T>
	 * @return
	 */

	public static <T> T clone(final T sourceObject) {
		if (sourceObject == null) {
			return null;
		}
		return cloner.deepClone(sourceObject);
	}
}
